<template lang="html">
  <div :class="'bank_item ' + item.bank_code">
    <div :class="'bank_item_logo ' + item.bank_code +'_logo'">
      <span :class="action_txt === '解绑' ? 'delete replace-bank' : 'replace-bank'" @click="bindAction">{{action_txt}}</span>
      <!-- </navigator> -->
      <div class="bank_name">
        <span>{{item.bank_name}}</span>
        <span class="bank_type">储蓄卡</span>
      </div>
      <div class="bank_num">{{item.bankcard_number}}</div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['action_txt', 'item', 'action'],
  methods: {
    bindAction () {
      if (this.action === 'delete') {
        this.$parent.delBank(this.item)
      } else {
        this.$parent.openSelectBank()
      }
    }
  }
}
</script>

<style lang="css" scoped>
/* pages/component/common/bank/bank_item.wxss */

</style>
